<%--
  Created by IntelliJ IDEA.
  User: dj
  Date: 2018-09-17
  Time: 15:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link rel="stylesheet" href="/static/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/login-1.css">
    <link rel="stylesheet" type="text/css" href="/static/css/pagemain.css">
    <link rel="stylesheet" type="text/css" href="/static/css/index.css">
    <link rel="stylesheet" href="/static/js/layui/css/layui.css"/>
    <link rel="stylesheet" href="/static/js/bootstrap-3.3.5/assets/bootstrap-table/src/bootstrap-table.css"/>
    <link rel="stylesheet" href="/static/js/bootstrap-3.3.5/assets/examples.css"/>
    <link rel="stylesheet" href="/static/js/bootstrap-3.3.5/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/static/css/my-stlye.css"/>
    <link rel="stylesheet" href="/static/js/plugins/layer/skin/layer.css"/>
    <link rel="stylesheet" type="text/css" href="/static/js/jquery-easyui-1.5/themes/default/easyui.css">
	
	
    <script type="text/javascript" src="/static/js/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="/static/js/bootstrap-3.3.5/bootstrap.min.js"></script>
    <script type="text/javascript" src="/static/js/jquery-easyui-1.5/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/js/easyuiPager.js"></script>
    <script type="text/javascript" src="/static/js/jquery-easyui-1.5/datagrid-filter.js"></script>
    <script type="text/javascript" src="/static/js/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="/static/js/my97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="/static/js/dlchart.js"></script>
    <script type="text/javascript" src="/static/js/echarts.min.js"></script>
    <script type="text/javascript" src="/static/js/common.js"></script>
    <script type="text/javascript" src="/static/js/my97DatePicker/WdatePicker.js"></script>
    <title>科室预警</title>

    <script type="text/javascript">
        $(function () {
            var height = findDimensions_height();
            $("#l_datagrid").height(height - 50); 
            var date = $.getdate.getPresentDate();
            var now = new Date();
            now.addDays(-15);//加减日期操作	 
            $("#yyinfo").height(300);
            $("#ssinfo").height(300);
            $("#zlczinfo").height(300);
            $("#jyinfo").height(300);
            $('#srq').val(now.format("yyyy-MM-dd"));
            $('#erq').val(date);
            initl_datagrid();
            search();
        })
        function search() {
            var myurl = new objURL();
            var kscode = myurl.get('kscode');
            $.getJSON("/commapiV2", {
                p_dm: "Y_ysjg_GetKsYjInfo",
                Sdate: $('#srq').val(),
                Edate: $('#erq').val(),
                KsCode: kscode
            }, function (data) {
                if (data.success) {
                    var griddata = {};
                    griddata.rows = data.Table;
                    griddata.total = data.totalcount;
                    $('#l_datagrid').datagrid('loadData', griddata);
                    $("#l_datagrid").datagrid("selectRow", 0);
                }
            }, true);
        }
        function initl_datagrid() {
            $("#l_datagrid").datagrid({
                fit: false, //自动适屏功能
                rownumbers: true,//显示行号
                singleSelect: true,//只显示一行 
                remoteSort: false,
                clientPaging: false,
                fitColumns: true,
                sortable: true, //启用排序列
                collapsible: true,
                idField: 'kscode',
                columns: [
                    [
                        {field: 'kscode', title: '科室代码', hidden: true},
                        {field: 'ksname', title: '科室名称', width: '150px', align: 'center',
					  formatter: function(value,row,index){
                            return '<a style="color:blue" href="/Grinfo/Yj_KsList?kscode='+row.kscode+'&Sdate='+$('#srq').val()+'&Edate='+$('#erq').val()+'&List=" target="view_frame">'+row.ksname+'</a>';
                       }},
                        {field: 'zkrs', title: '在科人数', width: '90px', align: 'center'},
                        {field: 'F1', title: '体温异常<br />人数', width: '90px', align: 'center'},
                        {field: 'F2', title: '病原学<br />送检人数', width: '90px', align: 'center'},
                        {field: 'F3', title: '病原学送检<br />阳性人数', width: '90px', align: 'center'},
                        {field: 'F4', title: '使用抗菌<br />药物人数', width: '90px', align: 'center'},
                        {field: 'F5', title: '血常规中性粒细胞<br />百分比异常人数', width: '90px', align: 'center'},
                        {field: 'F6', title: '血常规白细胞<br />异常人数', width: '90px', align: 'center'},
                        {field: 'F7', title: 'C反应蛋白<br />异常人数', width: '90px', align: 'center'},
                        {field: 'F8', title: '便常规镜检白细<br />胞异常人数', width: '90px', align: 'center'},
                        {field: 'F9', title: '胸腹水常规白细<br />胞异常人数', width: '90px', align: 'center'},
                        {field: 'F10', title: '红细胞沉降率<br />异常人数', width: '90px', align: 'center'},
                        {field: 'F11', title: '降钙素原异常<br />异常人数', width: '90px', align: 'center'},
                        {field: 'F12', title: '尿检白细胞异<br />常人数', width: '90px', align: 'center'},
                    ]
                ]
            });
        }
    </script>

</head>
<body>
<div class="top-demand" id="top-demand" style="top: 0px;">
    <div style="height: auto;">
        <ul id="topdiv" style="margin-bottom: 0px; float: left; line-height: 40px">
            <label>日期：</label>
            <input type="text" class="Wdate" id="srq"
                   style="width: 120px;height: 28px;vertical-align: middle;margin-bottom: 3px;border-radius:2px;border: 1px solid #ddd !important"
                   onfocus="WdatePicker({el:'srq',startDate:'%y',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true,maxDate:'%y'})">
            <input type=" text" class="Wdate" id="erq" style="width: 120px;height: 28px;vertical-align:
            middle;margin-bottom: 3px;border-radius:2px;border: 1px solid #ddd !important"
                   onfocus="WdatePicker({el:'erq',startDate:'%y',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true,maxDate:'%y'})">
        </ul>
        <div class="top-btn" onclick="search()">查询</div>
    </div>
</div>
<div id="item2" class="man-c-2" style="padding: 0px; width: 100%; margin-top: 47px;">
    <div style="overflow: hidden; ">
        <table id="l_datagrid" class="datagrid" style="width: 100%;"></table>
    </div>
</div>
</body>
</html>
